/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
class Animal {
    public String name = "父类";
    public int age;
    public void walk(){
        System.out.println("父类的走");
    }
}
class Dog extends Animal{
    public String name = "子类";
    public void walk() {
        System.out.println("子类的走");
    }
    public void test(){
        System.out.println(super.name);
        super.walk();//在子类中调用父类


    }

}

public class Main {
    public static void main(String[] args) {
        Dog dog = new Dog();
        System.out.println(dog.name);
        dog.test();
        dog.walk();
    }
}